package com.myproject.mapper;

import com.myproject.pojo.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class EmployeeMapperImpl implements EmployeeMapper{
    @Autowired
    private EmployeeMapper employeeMapper;


    @Override
    public List<Employee> queryAll() {
        List<Employee> employees = employeeMapper.queryAll();
        return employees;
    }

    @Override
    public Employee queryById(int id) {
        Employee employee = employeeMapper.queryById(id);
        return employee;
    }

    @Override
    public Boolean saveEmp(Employee employee) {
        return employeeMapper.saveEmp(employee);
    }

    @Override
    public Boolean deleteEmp(int id) {
        return employeeMapper.deleteEmp(id);
    }
}
